import { State } from "./AState";
import { ITransition } from "./Transition";
import { Transition } from "./Transition/Transition";



export class UpdateResult
{
    actions!:Action[];
    transition?:ITransition<any>;
    level:number=0;
}

export abstract class HSMBase<T>
{
    protected arg!:T;
    public Update(arg:T):UpdateResult
    {
        this.arg = arg;
        const result =  new UpdateResult();
        result.actions = this.getActions(arg);
        result.transition = undefined;
        result.level =this.getLevel();

        return result;
    }

    public getActions(arg:T):Action[]
    {
        return [];
    }

    abstract getStates():State[];

    abstract getLevel():number;
}
